<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>花礼网后台管理系统-分类管理</title>
    <base href="http://${pageContext.request.serverName }:${pageContext.request.serverPort }${pageContext.request.contextPath }/" />
    <link rel="stylesheet" href="css/bootstrap.css">
    <script src="js/jquery-3.6.0.js"></script>
    <script src="js/laydate/laydate.js"></script>
    <link rel="stylesheet" href="css/Top.css">
    <link rel="stylesheet" href="css/Left.css">
    <link rel="stylesheet" href="css/commodityList.css">
</head>
<body>
<div class="container-fluid">

    <div class="row">
        <div class="col-md-2 stick"><%@include file="Left.jsp"%></div>
        <div class="col-md-10 col-md-offset-2"><%@include file="Top.jsp"%></div>
        <div class="col-md-10 col-md-offset-2">
            <form action="manager/orderDetailServlet.shtml" method="post">
                <hr>
                <c:set var="o" value="${requestScope.order}"></c:set>
                <a class="col-md-offset-11"><button class="btn btn-primary">保存</button></a>
                <hr>
                <div class="table-responsive">
                    <table class="table table-bordered">
                        <tr>
                            <th class="col-md-2">订单编号：</th>
                            <td colspan="4">${o.id}</td>
                            <input type="hidden" name="id" value="${o.id}">
                        </tr>
                        <tr>
                            <th class="col-md-2">收货人姓名：</th>
                            <td>${o.shouname}
                            </td>
                            <th class="col-md-2">收货人手机号：</th>
                            <td>${o.shouphone}
                            </td>
                        </tr>
                        <tr>
                            <th class="col-md-2">收货地址：</th>
                            <td colspan="4">${o.shouaddress}
                            </td>
                        </tr>
                        <tr>
                            <th class="col-md-2">订货人姓名：</th>
                            <td>${o.dingname}
                            </td>
                            <th class="col-md-2">订货人手机号：</th>
                            <td>${o.dingphone}
                            </td>
                        </tr>
                        <tr>
                            <th class="col-md-2">送达日期：</th>
                            <td colspan="4">
                                <input type="text" name="servicedate" id="addDate" value="${o.servicedateStr}" class="form-control"/>
                            </td>
                        </tr>
                        <tr>
                            <th class="col-md-2">贺卡留言：</th>
                            <td colspan="4">
                                <input name="msg" type="text" value="${o.greetingcardmsg}" class="form-control">
                            </td>
                        </tr>
                        <tr>
                            <th class="col-md-2">备注：</th>
                            <td colspan="4">
                                <input name="ps" type="text" value="${o.content}" class="form-control">
                            </td>
                        </tr>
                        <tr>
                            <th class="col-md-2">应付金额：</th>
                            <td>￥ ${o.copewithprice}</td>
                            <th class="col-md-2">实付金额：</th>
                            <td>￥ ${o.paidinprice}</td>
                        </tr>
                        <tr>
                            <th class="col-md-2">订单状态：</th>
                            <td>
                                ${o.orderstateStr}
                            </td>
                            <th class="col-md-2">下单日期：</th>
                            <td class="col-md-4">${o.orderdateStr}</td>
                        </tr>

                        <tr>
                            <th colspan="2">商品名称</th>
                            <th>数量</th>
                            <th>价格</th>
                        </tr>

                        <c:forEach items="${o.commodityDetailsList}" var="cl">
                            <tr>
                                <td colspan="2">
                                    <img src="image/commodity/${cl.comimage}" width="50px" height="50px">&nbsp;&nbsp;
                                    <a href="commodityDetails.shtml?id=${cl.id}">${cl.comname}</a>
                                </td>
                                <td>x ${cl.num}</td>
                                <td>￥ ${cl.totalPrice}</td>
                            </tr>
                        </c:forEach>
                    </table>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<script>
    $(function (){
        //左侧‘分类管理’变红
        $("#ul li:nth-child(4) a").css("color","red");
        $("#let").html("订单列表>订单详情");

        //日期框子
        laydate.render({
            elem: '#addDate' ,//指定元素
        });

        $("[name='orderstate']").val(${o.orderstate})

    })
</script>

</html>
